package com.qiao.glod.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.qiao.glod.R;


public class SplashActivity extends QActivity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);
    }

    @Override
    protected void initViews() {
        super.initViews();
        final View background = findViewById(R.id.de_img_backgroud);

//        background.postDelayed(new Runnable() {
//            @Override
//            public void run() {
//                Animation animation = AnimationUtils.loadAnimation(SplashActivity.this, R.anim.translate_anim);
//                background.startAnimation(animation);
//
//            }
//        }, 200);

        background.postDelayed(startMain,2000);
    }

    private Runnable startMain = new Runnable() {
        @Override
        public void run() {
            finish();
            startActivity(new Intent(SplashActivity.this,MainActivity.class));
        }
    };
}
